package com.todo.strategy.online.application.service;

import com.todo.strategy.common.enums.PlanRelationSceneEnum;
import com.todo.strategy.online.application.entity.bo.PlanRelationBO;

import java.util.List;
import java.util.Map;

/**
 * (PlanRelation)表服务接口
 *
 * @author zhangwenxiang
 * @since 2024-03-04 00:19:47
 */
public interface PlanRelationService {

    /**
     * 新增计划关联信息
     *
     * @param planRelationBO
     * @return
     */
    Boolean insertPlanRelation(PlanRelationBO planRelationBO);

    /**
     * 更新计划关联信息
     *
     * @param planRelationBO
     * @return
     */
    Boolean updatePlanRelation(PlanRelationBO planRelationBO);

    /**
     * 根据业务主键和id列表删除对应数据
     *
     * @param businessId
     * @param businessScene
     * @param idList
     * @return
     */
    Boolean removePlanRelationByIdList(Long businessId, PlanRelationSceneEnum businessScene, List<Long> idList);

    /**
     * 根据业务主键删除数据
     *
     * @param businessId
     * @param businessScene
     * @return
     */
    Boolean removePlanRelationByBizId(Long businessId, PlanRelationSceneEnum businessScene);

    /**
     * 根据主键查询数据详情
     *
     * @param id
     * @return
     */
    PlanRelationBO queryPlanRelationById(Long id);

    /**
     * 根据业务Id查询数据列表
     *
     * @param businessId
     * @param businessScene
     * @return
     */
    List<PlanRelationBO> queryPlanRelationByBizId(Long businessId, PlanRelationSceneEnum businessScene);

    /**
     * 根据业务Id查询数据Map
     * Key-天数；Value-关联数据列表
     *
     * @param businessId
     * @param businessScene
     * @return
     */
    Map<Integer, List<PlanRelationBO>> queryPlanRelationMapByBizId(Long businessId, PlanRelationSceneEnum businessScene);

    /**
     * 批量新增关联数据
     *
     * @param insertList
     * @return
     */
    Boolean insertPlanRelationList(List<PlanRelationBO> insertList);
}
